package hw048901.lesson1;

import java.util.Iterator;
import java.util.List;

public class TPrintClsInt {
	private List<Integer> listInt;
	
	public TPrintClsInt(List<Integer> listInt) {
		super();
		this.listInt = listInt;
	}
	public TPrintClsInt() {
	}	


	public List<Integer> getListInt() {
		return listInt;
	}

	public void setListInt(List<Integer> listInt) {
		this.listInt = listInt;
	}
	public void printCInt(List list,int pi)
	{
		{

			int j;
			try {
				list = list.subList(0, pi);
				System.out.print(list.toString().concat("  \n"));
				//System.out.print("in printCInt, list = " .concat(list.toString()).concat("  \n"));
				/*
				for (j = 0; j < pi - 1; j++) {
					System.out.print(list.get(j).toString().concat("  "));
				}*/
			} catch (Exception e) {
				e.printStackTrace();
			}
		}
	}	
	public boolean BreakCInt(Integer o1)
	{
		   boolean isBreak=false;
		   int j;
		   try
		   {
		    for (j=0;j<this.listInt.size()-1;j++)
		    {
			    	if (o1.equals(this.listInt.get(j))) 
			    	{
			    		isBreak = true;
			    		break;
			    	}
			    }
		    
		   } 
		   catch(Exception e)
		   {
			   e.printStackTrace();
			  
		   }
		   return isBreak;  
	}	
}
